<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>左侧导航menu</title>
<link href="/static/admin/css/css.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/static/admin/js/sdmenu.js"></script>
<script type="text/javascript">
  function SDMenu(id) {
    if (!document.getElementById || !document.getElementsByTagName)
      return false;
    this.menu = document.getElementById(id);
    this.submenus = this.menu.getElementsByTagName("div");
    this.remember = true;
    this.speed = 3;
    this.markCurrent = true;
    this.oneSmOnly = false;
  }
  SDMenu.prototype.init = function() {
    var mainInstance = this;
    for (var i = 0; i < this.submenus.length; i++)
      this.submenus[i].getElementsByTagName("span")[0].onclick = function() {
        mainInstance.toggleMenu(this.parentNode);
      };
    if (this.markCurrent) {
      var links = this.menu.getElementsByTagName("a");
      for (var i = 0; i < links.length; i++)
        if (links[i].href == document.location.href) {
          links[i].className = "current";
          break;
        }
    }
    if (this.remember) {
      var regex = new RegExp("sdmenu_" + encodeURIComponent(this.menu.id) + "=([01]+)");
      var match = regex.exec(document.cookie);
      if (match) {
        var states = match[1].split("");
        for (var i = 0; i < states.length; i++)
          this.submenus[i].className = (states[i] == 0 ? "collapsed" : "");
      }
    }
  };
  SDMenu.prototype.toggleMenu = function(submenu) {
    if (submenu.className == "collapsed")
      this.expandMenu(submenu);
    else
      this.collapseMenu(submenu);
  };
  SDMenu.prototype.expandMenu = function(submenu) {
    var fullHeight = submenu.getElementsByTagName("span")[0].offsetHeight;
    var links = submenu.getElementsByTagName("a");
    for (var i = 0; i < links.length; i++)
      fullHeight += links[i].offsetHeight;
    var moveBy = Math.round(this.speed * links.length);

    var mainInstance = this;
    var intId = setInterval(function() {
      var curHeight = submenu.offsetHeight;
      var newHeight = curHeight + moveBy;
      if (newHeight < fullHeight)
        submenu.style.height = newHeight + "px";
      else {
        clearInterval(intId);
        submenu.style.height = "";
        submenu.className = "";
        mainInstance.memorize();
      }
    }, 30);
    this.collapseOthers(submenu);
  };
  SDMenu.prototype.collapseMenu = function(submenu) {
    var minHeight = submenu.getElementsByTagName("span")[0].offsetHeight;
    var moveBy = Math.round(this.speed * submenu.getElementsByTagName("a").length);
    var mainInstance = this;
    var intId = setInterval(function() {
      var curHeight = submenu.offsetHeight;
      var newHeight = curHeight - moveBy;
      if (newHeight > minHeight)
        submenu.style.height = newHeight + "px";
      else {
        clearInterval(intId);
        submenu.style.height = "";
        submenu.className = "collapsed";
        mainInstance.memorize();
      }
    }, 30);
  };
  SDMenu.prototype.collapseOthers = function(submenu) {
    if (this.oneSmOnly) {
      for (var i = 0; i < this.submenus.length; i++)
        if (this.submenus[i] != submenu && this.submenus[i].className != "collapsed")
          this.collapseMenu(this.submenus[i]);
    }
  };
  SDMenu.prototype.expandAll = function() {
    var oldOneSmOnly = this.oneSmOnly;
    this.oneSmOnly = false;
    for (var i = 0; i < this.submenus.length; i++)
      if (this.submenus[i].className == "collapsed")
        this.expandMenu(this.submenus[i]);
    this.oneSmOnly = oldOneSmOnly;
  };
  SDMenu.prototype.collapseAll = function() {
    for (var i = 0; i < this.submenus.length; i++)
      if (this.submenus[i].className != "collapsed")
        this.collapseMenu(this.submenus[i]);
  };
  SDMenu.prototype.memorize = function() {
    if (this.remember) {
      var states = new Array();
      for (var i = 0; i < this.submenus.length; i++)
        states.push(this.submenus[i].className == "collapsed" ? 0 : 1);
      var d = new Date();
      d.setTime(d.getTime() + (30 * 24 * 60 * 60 * 1000));
      document.cookie = "sdmenu_" + encodeURIComponent(this.menu.id) + "=" + states.join("") + "; expires=" + d.toGMTString() + "; path=/";
    }
  };




	// <![CDATA[
	var myMenu;
	window.onload = function() {
		myMenu = new SDMenu("my_menu");
		myMenu.init();
	};
	// ]]>
</script>
<style type=text/css>
html{ SCROLLBAR-FACE-COLOR: #538ec6; SCROLLBAR-HIGHLIGHT-COLOR: #dce5f0; SCROLLBAR-SHADOW-COLOR: #2c6daa; SCROLLBAR-3DLIGHT-COLOR: #dce5f0; SCROLLBAR-ARROW-COLOR: #2c6daa;  SCROLLBAR-TRACK-COLOR: #dce5f0;  SCROLLBAR-DARKSHADOW-COLOR: #dce5f0; overflow-x:hidden;}
body{overflow-x:hidden; background:url(images/main/leftbg.jpg) left top repeat-y #f2f0f5; width:194px;}
</style>
</head>
<body onselectstart="return false;" ondragstart="return false;" oncontextmenu="return false;">
<div id="left-top">
	<div><img src="/static/admin/images/main/member.gif" width="44" height="44" /></div>
    <span>用户：admin<br>角色：超级管理员</span>
</div>
    <div style="float: left" id="my_menu" class="sdmenu">
      <div class="collapsed">
        <span>基础数据</span>
        <a href="{:url('/admin/company/company_list')}" target="mainFrame" onFocus="this.blur()">企业列表</a>
        <a href="{:url('/admin/park/park_list')}" target="mainFrame" onFocus="this.blur()">园区列表</a>
        <a href="{:url('/admin/push/push_list')}" target="mainFrame" onFocus="this.blur()">推送项目</a>
        <a href="{:url('/admin/push/monitor_list')}" target="mainFrame" onFocus="this.blur()">监控项目</a>
        <a href="main_menu.html" target="mainFrame" onFocus="this.blur()">栏目管理</a>
      </div>
      <!--<div>-->
        <!--<span>系统设置</span>-->
        <!--<a href="main.html" target="mainFrame" onFocus="this.blur()">分组权限</a>-->
        <!--<a href="{:url('/admin/company/company_list')}" target="mainFrame" onFocus="this.blur()">级别权限</a>-->
        <!--<a href="main_info.html" target="mainFrame" onFocus="this.blur()">角色管理</a>-->
        <!--<a href="main.html" target="mainFrame" onFocus="this.blur()">自定义权限</a>-->
      <!--</div>-->
      <!--<div>-->
        <!--<span>系统设置</span>-->
        <!--<a href="main.html" target="mainFrame" onFocus="this.blur()">分组权限</a>-->
        <!--<a href="main_list.html" target="mainFrame" onFocus="this.blur()">级别权限</a>-->
        <!--<a href="main_info.html" target="mainFrame" onFocus="this.blur()">角色管理</a>-->
        <!--<a href="main.html" target="mainFrame" onFocus="this.blur()">自定义权限</a>-->
      <!--</div>-->
      <!--<div>-->
        <!--<span>系统设置</span>-->
        <!--<a href="main.html" target="mainFrame" onFocus="this.blur()">分组权限</a>-->
        <!--<a href="main_list.html" target="mainFrame" onFocus="this.blur()">级别权限</a>-->
        <!--<a href="main_info.html" target="mainFrame" onFocus="this.blur()">角色管理</a>-->
        <!--<a href="main.html" target="mainFrame" onFocus="this.blur()">自定义权限</a>-->
      <!--</div>-->
    <!--</div>-->
</body>
</html>